<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/axios-0.18.0.js"></script>
    <script src="js/vuejs-2.5.16.js"></script>
</head>
<body>
<div id="app">
    <h1>网站列表</h1>
    <div v-for="u in userList">
        {{ u }}<br>

    </div>
    <div>
        {{ userList.id }}<br>
        {{userList.name}}<br>
        {{userList.money}}<br>
    </div>

</div>
<script type="text/javascript">
    new Vue({
        el: '#app',
        data: {
            /*  user:{
                  id:"",
                  name:"",
                  money:""
              },*/
            userList: []
        },
        mounted() {
            axios
                .get('/test/new3?id=2')
                .then(response => (this.userList = response.data))
                .catch(function (error) { // 请求失败处理
                    console.log(error);
                });
        }
    })
</script>
</body>
</html>